package org.example.common.enums;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

@Target(ElementType.METHOD)  // 只能标注在方法上
@Retention(RetentionPolicy.RUNTIME)  // 运行时生效
public @interface RedisCache {
    String key() default "";
    int expire() default -1;
    TimeUnit timeUnit() default TimeUnit.SECONDS;
    Class<?> value() default Object.class;

}
